<template>
  <div class="ma-content-block lg:flex justify-between p-4">
    <!-- CRUD 组件 -->
    <ma-crud :options="options" :columns="columns" ref="crudRef">
    </ma-crud>
  </div>
</template>
<script setup>
import { ref, reactive } from 'vue'
import depotWiswomAccount from '@/api/warehouse/depotWiswomAccount'
import { Message } from '@arco-design/web-vue'
import tool from '@/utils/tool'
import * as common from '@/utils/common'
import dictHelp from "@/utils/dicthelp.js";
const crudRef = ref()




const options = reactive({
  id: 'depot_wiswom_account',
  pageLayout: 'fixed',
  rowSelection: {
    showCheckedAll: true
  },
  pk: 'id',
  operationColumn: true,
  operationColumnWidth: 160,
  formOption: {
    viewType: 'drawer',
    width: 600
  },
  api: depotWiswomAccount.getList,
  add: {
    show: true,
    api: depotWiswomAccount.save,
    auth: ['warehouse:depotWiswomAccount:save']
  },
  edit: {
    show: true,
    api: depotWiswomAccount.update,
    auth: ['warehouse:depotWiswomAccount:update']
  },
  delete: {
    show: true,
    api: depotWiswomAccount.deletes,
    auth: ['warehouse:depotWiswomAccount:delete']
  }
})

const columns = reactive([
  {
    title: "主键",
    dataIndex: "id",
    formType: "input",
    addDisplay: false,
    editDisplay: false,
    hide: true,
    commonRules: {
      required: true,
      message: "请输入主键"
    }
  },
  {
    title: "仓库id",
    dataIndex: "depot_id",
    formType: "select",
    dict:dictHelp.depot,
    search: true,
    commonRules: {
      required: true,
      message: "请输入仓库id"
    }
  },
  {
    title: "新智慧账号",
    dataIndex: "account",
    formType: "input",
    search: true,
    commonRules: {
      required: true,
      message: "请输入新智慧账号"
    }
  },
  {
    title: "密码(PASS)",
    dataIndex: "pass",
    formType: "input",
    search: true,
    hide: true,
    commonRules: {
      required: true,
      message: "请输入新智慧密码"
    }
  },
  {
    title: "密钥(KEY)",
    dataIndex: "key",
    formType: "input",
    search: true,
    commonRules: {
      required: true,
      message: "请输入新智慧密钥"
    }
  },
])
</script>
<script> export default { name: 'warehouse:depotWiswomAccount' } </script>